package com.funny.mid;

/**
 * @author fanxiao  2021/8/20
 * @since 1.0.0
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory{

	private Configuration configuration;

	public DefaultSqlSessionFactory(Configuration configuration) {
		this.configuration = configuration;
	}

	@Override
	public SqlSession openSqlSession() {
		return new DefaultSqlSession(configuration.getConnection(), configuration.getMapperElement());
	}
}
